App.config(['$httpProvider', function ($httpProvider) {
        $httpProvider.defaults.transformRequest = function (data) {
            var arr = [];
            angular.forEach(data, function (val, key) {
                arr.push(encodeURIComponent(key) + '=' + encodeURIComponent(val));
            });
            return arr.join('&');
        };
        //通过下面这一行你能看到你$http的默认配置信息
        $httpProvider.defaults.headers = {
            post: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        }
    }]);
